home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / CUCD / Graphics / Ghostscript / man / man1 / gs.0 next >
Text File  |  1997-04-12  |  16KB  |  463 lines

  1.  
  2.  
  3.  
  4. GS(1)                                                       GS(1)
  5.  
  6.  
  7. NNAAMMEE
  8.        gs - Aladdin Ghostscript interpreter/previewer
  9.  
  10. SSYYNNOOPPSSIISS
  11.        ggss [ _o_p_t_i_o_n_s ] [ _f_i_l_e_s ] ...
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.        Ghostscript   is   an  implementation  of  Adobe  Systems'
  15.        PostScript (tm) language, which  is  in  turn  similar  to
  16.        Forth.   _G_s  reads  _f_i_l_e_s in sequence and executes them as
  17.        Ghostscript programs.  After doing this, it reads  further
  18.        input  from  the  standard input stream (normally the key-
  19.        board).  Each line is  interpreted  separately.   To  exit
  20.        from  the  interpreter,  enter  the  `quit'  command.  The
  21.        interpreter also exits gracefully if it encounters end-of-
  22.        file.   Typing the interrupt character (e.g. Control-C) is
  23.        also safe.
  24.  
  25.        The  interpreter  recognizes  several  switches  described
  26.        below,  which  may appear anywhere in the command line and
  27.        apply to all files thereafter.
  28.  
  29.        You can get a help message by  invoking  Ghostscript  with
  30.        the  --hh or --??  option.  This message also lists the avail-
  31.        able devices.
  32.  
  33.        Ghostscript may be built  with  multiple  output  devices.
  34.        Ghostscript  normally opens the first one and directs out-
  35.        put to it.  To  use  device  xyz  as  the  initial  output
  36.        device, include the switch
  37.             -sDEVICE=xyz
  38.        in  the  command line.  Note that this switch must precede
  39.        the first .ps file, and only its first invocation has  any
  40.        effect.   For example, for printer output in a normal con-
  41.        figuration that includes  an  Epson  printer  driver,  you
  42.        might use the shell command
  43.             gs -sDEVICE=epson myfile.ps
  44.        instead of just
  45.             gs myfile.ps
  46.        Alternatively, you can type
  47.             (epson) selectdevice
  48.             (myfile.ps) run
  49.        All output then goes to the printer instead of the display
  50.        until further notice.  You can switch devices at any  time
  51.        by using the selectdevice procedure, e.g.,
  52.             (vga) selectdevice
  53.        or
  54.             (epson) selectdevice
  55.        As  yet a third alternative, you can define an environment
  56.        variable GS_DEVICE as the  desired  default  device  name.
  57.        The order of precedence for these alternatives, highest to
  58.        lowest, is:
  59.             selectdevice
  60.             (command line)
  61.  
  62.  
  63.  
  64.                         23 September 1996                       1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. GS(1)                                                       GS(1)
  71.  
  72.  
  73.             GS_DEVICE
  74.             (first device in build list)
  75.  
  76.        To select the density on a printer, use
  77.             gs -sDEVICE=<device> -r<xres>x<yres>
  78.        For example, on a 9-pin Epson-compatible printer, you  can
  79.        get the lowest-density (fastest) mode with
  80.             gs -sDEVICE=epson -r60x72
  81.        and the highest-density mode with
  82.             gs -sDEVICE=epson -r240x72.
  83.  
  84.        If  you select a printer as the output device, Ghostscript
  85.        also allows you to control where the device sends its out-
  86.        put.   Normally, output goes directly to a scratch file on
  87.        Unix systems.  To send the output to  a  series  of  files
  88.        foo1.xyz, foo2.xyz, ..., use the switch
  89.             -sOutputFile=foo%d.xyz
  90.        The %d is a printf format specification; you can use other
  91.        formats like %02d.  Each file will  receive  one  page  of
  92.        output.   Alternatively,  to  send  the output to a single
  93.        file foo.xyz, with all the  pages  concatenated,  use  the
  94.        switch
  95.             -sOutputFile=foo.xyz
  96.  
  97.        On  Unix  systems,  you  can send the output directly to a
  98.        pipe.  For example, to pipe  the  output  to  the  command
  99.        `lpr'  (which,  on  many Unix systems, is the command that
  100.        spools output for a printer), use the switch
  101.             -sOutputFile=\|lpr
  102.        You can also send output to stdout  for  piping  with  the
  103.        switch
  104.             -sOutputFile=-
  105.        In  this  case you must also use the -q switch, to prevent
  106.        Ghostscript from writing messages to stdout.
  107.  
  108.        To find out what devices are available, type
  109.             devicenames ==
  110.        after starting up Ghostscript.  Alternatively, you can use
  111.        the  -h or -? switch in the command line; the help message
  112.        also lists the available devices.
  113.  
  114.        To select a different paper size,  use  the  command  line
  115.        switch
  116.                -sPAPERSIZE=a_known_paper_size
  117.        e.g.,
  118.                -sPAPERSIZE=a4
  119.        or
  120.                -sPAPERSIZE=legal
  121.        As  of  this  printing,  the known paper sizes, defined in
  122.        gs_statd.ps, are: tab(>); l l l l l.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.                         23 September 1996                       2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ()                                                             ()
  137.  
  138.  
  139.        PAPERSIZE>X">Y">X  cm>Y  cm  _   11x17>11">17">27.94>43.18
  140.        a0>33.0556">46.7778">83.9611>118.816
  141.        a10>1.02778">1.45833">2.61056>3.70417
  142.        a1>23.3889">33.0556">59.4078>83.9611
  143.        a2>16.5278">23.3889">41.9806>59.4078
  144.        a3>11.6944">16.5278">29.7039>41.9806
  145.        a4>8.26389">11.6944">20.9903>29.7039
  146.        a5>5.84722">8.26389">14.8519>20.9903
  147.        a6>4.125">5.84722">10.4775>14.8519
  148.        a7>2.91667">4.125">7.40833>10.4775
  149.        a8>2.05556">2.91667">5.22111>7.40833
  150.        a9>1.45833">2.05556">3.70417>5.22111
  151.        archA>9">12">22.86>30.48         archB>12">18">30.48>45.72
  152.        archC>18">24">45.72>60.96        archD>24">36">60.96>91.44
  153.        archE>36">48">91.44>121.92
  154.        b0>39.3889">55.6667">100.048>141.393
  155.        b1>27.8333">39.3889">70.6967>100.048
  156.        b2>19.6944">27.8333">50.0239>70.6967
  157.        b3>13.9167">19.6944">35.3483>50.0239
  158.        b4>9.84722">13.9167">25.0119>35.3483
  159.        b5>6.95833">9.84722">17.6742>25.0119
  160.        flsa>8.5">13">21.59>33.02        flse>8.5">13">21.59>33.02
  161.        halfletter>5.5">8.5">13.97>21.59
  162.        ledger>17">11">43.18>27.94 legal>8.5">14">21.59>35.56 let-
  163.        ter>8.5">11">21.59>27.94 note>7.5">10">19.05>25.4
  164.  
  165. IINNIITTIIAALLIIZZAATTIIOONN FFIILLEESS
  166.        When looking for the initialization files  (gs_*.ps),  the
  167.        files  related  to fonts, or the file for the `run' opera-
  168.        tor, Ghostscript first tries opening  the  file  with  the
  169.        name  as  given (i.e., using the current working directory
  170.        if none is specified).  If this fails, and the  file  name
  171.        doesn't  specify  an  explicit  directory  or drive (i.e.,
  172.        doesn't begin with `/' on Unix systems), Ghostscript  will
  173.        try directories in the following order:
  174.  
  175.        1.     The directory/ies specified by the -I switch(es) in
  176.               the command line (see below), if any;
  177.  
  178.        2.     The directory/ies specified by the GS_LIB  environ-
  179.               ment variable, if any;
  180.  
  181.        3.     The  directory/ies  specified by the GS_LIB_DEFAULT
  182.               macro in the Ghostscript makefile (which  has  been
  183.               set                                              to
  184.               "/usr/local/share/ghostscript/M.N:/usr/local/share/ghostscript/fonts"
  185.               where M.N is the Ghostscript version number).
  186.  
  187.        Each  of  these (GS_LIB_DEFAULT, GS_LIB, and -I parameter)
  188.        may be either a single directory, or a list of directories
  189.        separated by a `:'.
  190.  
  191. XX RREESSOOUURRCCEESS
  192.        Ghostscript  looks  for  the following resources under the
  193.  
  194.  
  195.  
  196.                                                                 1
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ()                                                             ()
  203.  
  204.  
  205.        program name `Ghostscript':
  206.  
  207.        bboorrddeerrWWiiddtthh
  208.               The border width in pixels (default = 1).
  209.  
  210.        bboorrddeerrCCoolloorr
  211.               The name of the border color (default = black).
  212.  
  213.        ggeeoommeettrryy
  214.               The window size and placement, WxH+X+Y (default  is
  215.               NULL).
  216.  
  217.        xxRReessoolluuttiioonn
  218.               The  number  of  x pixels per inch (default is com-
  219.               puted from WidthOfScreen and WidthMMOfScreen).
  220.  
  221.        yyRReessoolluuttiioonn
  222.               The number of y pixels per inch  (default  is  com-
  223.               puted from HeightOfScreen and HeightMMOfScreen).
  224.  
  225.        uusseeBBaacckkiinnggPPiixxmmaapp
  226.               Determines  whether backing store is to be used for
  227.               saving display window (default = true).
  228.  
  229.        See the  file  `use.txt'  for  a  more  complete  list  of
  230.        resources.
  231.  
  232.        To  set  these  resources,  put  them  in  a file (such as
  233.        ~/.Xresources) in the following form:
  234.  
  235.             Ghostscript*geometry:    612x792-0+0
  236.             Ghostscript*xResolution: 72
  237.             Ghostscript*yResolution: 72
  238.  
  239.        Then load the defaults into the X server:
  240.  
  241.             % xrdb -merge ~/.Xresources
  242.  
  243. OOPPTTIIOONNSS
  244.        ---- _f_i_l_e_n_a_m_e _a_r_g_1 _._._.
  245.               Takes the next argument as a file  name  as  usual,
  246.               but  takes  all  remaining  arguments (even if they
  247.               have the syntactic form of  switches)  and  defines
  248.               the  name ARGUMENTS in userdict (not systemdict) as
  249.               an array of those strings, _b_e_f_o_r_e running the file.
  250.               When  Ghostscript  finishes  executing the file, it
  251.               exits back to the shell.
  252.  
  253.        --DD_n_a_m_e==_t_o_k_e_n
  254.        --dd_n_a_m_e==_t_o_k_e_n
  255.               Define a name in systemdict with the given  defini-
  256.               tion.   The  token  must  be  exactly one token (as
  257.               defined by the `token' operator) and must not  con-
  258.               tain any whitespace.
  259.  
  260.  
  261.  
  262.                                                                 2
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ()                                                             ()
  269.  
  270.  
  271.        --DD_n_a_m_e
  272.        --dd_n_a_m_e Define a name in systemdict with value=null.
  273.  
  274.        --SS_n_a_m_e==_s_t_r_i_n_g
  275.        --ss_n_a_m_e==_s_t_r_i_n_g
  276.               Define  a name in systemdict with a given string as
  277.               value.  This is different from  -d.   For  example,
  278.               -dname=35 is equivalent to the program fragment
  279.                              /name 35 def
  280.               whereas -s name=35 is equivalent to
  281.                              /name (35) def
  282.  
  283.        --qq     Quiet  startup  - suppress normal startup messages,
  284.               and also do the equivalent of -dQUIET.
  285.  
  286.        --gg_n_u_m_b_e_r_1xx_n_u_m_b_e_r_2
  287.               Equivalent to --ddDDEEVVIICCEEWWIIDDTTHH==_n_u_m_b_e_r_1  and  --ddDDEEVVIICCEE--
  288.               HHEEIIGGHHTT==_n_u_m_b_e_r_2..  This is for the benefit of devices
  289.               (such as X11 windows) that require (or allow) width
  290.               and height to be specified.
  291.  
  292.        --rr_n_u_m_b_e_r
  293.        --rr_n_u_m_b_e_r_1xx_n_u_m_b_e_r_2
  294.               Equivalent to --ddDDEEVVIICCEEXXRREESSOOLLUUTTIIOONN==_n_u_m_b_e_r_1 and --ddDDEE--
  295.               VVIICCEEYYRREESSOOLLUUTTIIOONN==_n_u_m_b_e_r_2..  This is for  the  benefit
  296.               of devices (such as printers) that support multiple
  297.               X and Y resolutions.  (If only one number is given,
  298.               it is used for both X and Y resolutions.)
  299.  
  300.        --II_d_i_r_e_c_t_o_r_i_e_s
  301.               Adds the designated list of directories at the head
  302.               of the search path for library files.
  303.  
  304.        --      This is not  really  a  switch.   It  indicates  to
  305.               Ghostscript  that the standard input is coming from
  306.               a file or a pipe.   Ghostscript  reads  from  stdin
  307.               until  reaching  end-of-file, executing it like any
  308.               other file, and then continues processing the  com-
  309.               mand  line.   At  the  end  of  the  command  line,
  310.               Ghostscript exits rather than going into its inter-
  311.               active mode.
  312.  
  313.        Note  that  gs_init.ps  makes systemdict read-only, so the
  314.        values of names defined with -D/d/S/s  cannot  be  changed
  315.        (although,  of  course,  they can be superseded by defini-
  316.        tions in userdict or other dictionaries.)
  317.  
  318. SSPPEECCIIAALL NNAAMMEESS
  319.        --ddDDIISSKKFFOONNTTSS
  320.               Causes individual character outlines to  be  loaded
  321.               from  the disk the first time they are encountered.
  322.               (Normally Ghostscript loads all the character  out-
  323.               lines  when it loads a font.)  This may allow load-
  324.               ing more fonts into RAM, at the expense  of  slower
  325.  
  326.  
  327.  
  328.                                                                 3
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ()                                                             ()
  335.  
  336.  
  337.               rendering.
  338.  
  339.        --ddNNOOCCAACCHHEE
  340.               Disables character caching.  Only useful for debug-
  341.               ging.
  342.  
  343.        --ddNNOOBBIINNDD
  344.               Disables the  `bind'  operator.   Only  useful  for
  345.               debugging.
  346.  
  347.        --ddNNOODDIISSPPLLAAYY
  348.               Suppresses  the normal initialization of the output
  349.               device.  This may be useful when debugging.
  350.  
  351.        --ddNNOOPPAAUUSSEE
  352.               Disables the prompt and pause at the  end  of  each
  353.               page.  This may be desirable for applications where
  354.               another program is `driving' Ghostscript.
  355.  
  356.        --ddNNOOPPLLAATTFFOONNTTSS
  357.               Disables the use of fonts supplied by the  underly-
  358.               ing  platform (e.g. X Windows).  This may be needed
  359.               if the platform fonts  look  undesirably  different
  360.               from the scalable fonts.
  361.  
  362.        --ddSSAAFFEERR
  363.               Disables  the  deletefile and renamefile operators,
  364.               and the ability to open files  in  any  mode  other
  365.               than read-only.  This may be desirable for spoolers
  366.               or other sensitive environments.
  367.  
  368.        --ddWWRRIITTEESSYYSSTTEEMMDDIICCTT
  369.               Leaves systemdict writable.  This is necessary when
  370.               running special utility programs such as font2c and
  371.               pcharstr,  which  must  bypass  normal   PostScript
  372.               access protection.
  373.  
  374.        --ssDDEEVVIICCEE==_d_e_v_i_c_e
  375.               Selects  an  alternate  initial  output  device, as
  376.               described above.
  377.  
  378.        --ssOOuuttppuuttFFiillee==_f_i_l_e_n_a_m_e
  379.               Selects an alternate output file (or pipe) for  the
  380.               initial output device, as described above.
  381.  
  382. FFIILLEESS
  383.        //uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//MM..NN//**
  384.               Startup-files,  utilities,  and  basic font defini-
  385.               tions.
  386.  
  387.        //uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//ffoonnttss//**
  388.               Additional font definitions.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.                                                                 4
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ()                                                             ()
  401.  
  402.  
  403.        //uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//MM..NN//eexxaammpplleess//**
  404.               Demo Ghostscript files.
  405.  
  406.        //uussrr//llooccaall//sshhaarree//gghhoossttssccrriipptt//MM..NN//ddoocc//**
  407.               Assorted document files.
  408.  
  409. EENNVVIIRROONNMMEENNTT
  410.        GGSS__OOPPTTIIOONNSS
  411.               String of options to be processed before  the  com-
  412.               mand line options.
  413.  
  414.        GGSS__DDEEVVIICCEE
  415.               Used to define the device used.
  416.  
  417.        GGSS__FFOONNTTPPAATTHH
  418.               Path names used to search for fonts
  419.  
  420.        GGSS__LLIIBB Path names for initialization files and fonts
  421.  
  422.        TTEEMMPP   Where temporary files are made
  423.  
  424. SSEEEE AALLSSOO
  425.        The various Ghostscript document files (above).
  426.  
  427. BBUUGGSS
  428.        See the network news group `comp.lang.postscript'.
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.                                                                 5
  461.  
  462.  
  463.